    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// 用户登录
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// 权限菜单
export const getMenuTree = () => {
    return service({
        url: '/user/index/getMenuTree',
        method: 'post',
    })
};
// 用户列表
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
        data
    })
};
// 用户修改
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUser',
        method: 'post',
        data
    })
};
// 用户修改
export const deleteById = (id:any) => {
    return service({
        url: '/user/index/deleteById/'+id,
        method: 'post',
    
    })
};
// 用户修改
export const deleteBatch = (data:any) => {
    return service({
        url: '/user/index/deleteBatch',
        method: 'post',
        data
    })
};
// 用户修改
export const checkUser = (data:any) => {
    return service({
        url: '/user/index/checkUser',
        method: 'post',
        data
    })
};
// 品牌添加
export const addBrand = (data:any) => {
    return service({
        url: '/shop/index/addBrand',
        method: 'post',
        data
    })
};
// 品牌列表
export const getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
// 改变状态
export const changeStatus = (data:any) => {
    return service({
        url: '/shop/index/changeStatus',
        method: 'post',
        data
    })
};
// 商品类型树
export const getTypeTree = () => {
    return service({
        url: '/shop/type/getTypeTree',
        method: 'get',
    })
};
// 修改类型状态
export const setTypeStatus = (id:any,status:any) => {
    return service({
        url: '/shop/type/setTypeStatus/'+id+'/'+status,
        method: 'post',
    })
};
// 删除类型
export const deleteTypeById = (typeId:any) => {
    return service({
        url: '/shop/type/deleteTypeById/'+typeId,
        method: 'post',
    })
};
// 添加类型
export const addType = (data:any) => {
    return service({
        url: '/shop/type/addType',
        method: 'post',
        data
    })
};
// 修改类型
export const updateType = (data:any) => {
    return service({
        url: '/shop/type/updateType',
        method: 'post',
        data
    })
};
// 商品列表
export const getProdList = (data:any) => {
    return service({
        url: '/shop/prod/getProdList',
        method: 'post',
        data
    })
};
// 商品添加
export const addProd = (data:any) => {
    return service({
        url: '/shop/prod/addProd',
        method: 'post',
        data
    })
};
// 批量删除
export const deleteAllProd = (data:any) => {
    return service({
        url: '/shop/prod/deleteAllProd',
        method: 'post',
        data
    })
};
// 商品类型数
export const getTypeSelectTree = () => {
    return service({
        url: '/shop/type/getTypeSelectTree',
        method: 'post',
    })
};
// 获取所有品牌列表
export const getBrandAll = () => {
    return service({
        url: '/shop/brand/getBrandAll',
        method: 'post',
    })
};
// 获取所有单位列表
export const getUnitAll = () => {
    return service({
        url: '/shop/unit/getUnitAll',
        method: 'post',
    })
};
// 获取所有标签列表
export const getTagAll = () => {
    return service({
        url: '/shop/tag/getTagAll',
        method: 'post',
    })
};
// 获取所有供应商列表
export const getApprAll = () => {
    return service({
        url: '/shop/appr/getApprAll',
        method: 'post',
    })
};
// 添加商品附件
export const addProdAtta = (data:any) => {
    return service({
        url: '/shop/prod/addProdAtta',
        method: 'post',
        data
    })
};
// 分页获取商品详情
export const getProdInfo = (data:any) => {
    return service({
        url: '/shop/ProdInfo/getProdInfo',
        method: 'post',
        data
    })
};


